﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RXY_Mall.Application.Marketing.Dto
{
    #region Banner
    public class GetBannersOutput
    {
        /// <summary>
        /// bannerId
        /// </summary>
        public int banner_id { get; set; }
        /// <summary>
        /// 类型ID
        /// </summary>
        public int type_id { get; set; }
        /// <summary>
        /// 类型名
        /// </summary>
        public string type_name { get; set; }
        /// <summary>
        /// 图片url
        /// </summary>
        public string picture_url { get; set; }
        /// <summary>
        /// 标题
        /// </summary>
        public string title { get; set; }
        /// <summary>
        /// 内容
        /// </summary>
        public string content { get; set; }
        /// <summary>
        /// 排序
        /// </summary>
        public int sort { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        public byte status { get; set; }
        /// <summary>
        /// 添加时间
        /// </summary>
        public System.DateTime add_time { get; set; }
    }

    public class UpdateBannerStatusInput
    {
        /// <summary>
        /// bannerId
        /// </summary>
        public int banner_id { get; set; }
        /// <summary>
        /// bannner状态
        /// </summary>
        public int status { get; set; }
    }

    public class GetBannerOutput
    {
        /// <summary>
        /// bannerId
        /// </summary>
        public int banner_id { get; set; }
        /// <summary>
        /// 类型ID
        /// </summary>
        public int type_id { get; set; }
        /// <summary>
        /// 图片
        /// </summary>
        [DisplayName("图片")]
        [Required(ErrorMessage = "图片不能为空！")]
        public string picture_url { get; set; }
        /// <summary>
        /// 标题
        /// </summary>
        [DisplayName("标题")]
        [Required(ErrorMessage = "标题不能为空！")]
        public string title { get; set; }
        /// <summary>
        /// 内容
        /// </summary>
        [DisplayName("内容")]
        [Required(ErrorMessage = "内容不能为空！")]
        public string content { get; set; }
        /// <summary>
        /// 排序
        /// </summary>
        [DisplayName("排序")]
        public int sort { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        [DisplayName("状态")]
        public byte status { get; set; }
        /// <summary>
        /// 添加时间
        /// </summary>
        [DisplayName("添加时间")]
        public System.DateTime add_time { get; set; }
    }
    #endregion

    #region 首页商品
    public class GetHomeGoodsOutput
    {
        /// <summary>
        /// 首页商品编号
        /// </summary>
        [DisplayName("首页商品编号")]
        public int home_goods_id { get; set; }
        /// <summary>
        /// 商品编号
        /// </summary>
        [DisplayName("商品编号")]
        [Required(ErrorMessage = "商品编号不能为空！")]
        public int goods_id { get; set; }
        /// <summary>
        /// 商品名称
        /// </summary>
        [DisplayName("商品名称")]
        public string goods_name { get; set; }
        /// <summary>
        /// 图片
        /// </summary>
        [DisplayName("图片")]
        [Required(ErrorMessage = "图片不能为空！")]
        public string picture_url { get; set; }
        /// <summary>
        /// 排序
        /// </summary>
        [DisplayName("排序")]
        [Required(ErrorMessage = "排序不能为空！")]
        public int sort { get; set; }
        /// <summary>
        /// 类型
        /// </summary>
        public byte type { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        [DisplayName("状态")]
        [Required(ErrorMessage = "状态不能为空！")]
        public byte status { get; set; }
        /// <summary>
        /// 添加时间
        /// </summary>
        [DisplayName("添加时间")]
        public System.DateTime add_time { get; set; }

    }

    public class UpdateHomeGoodsStatusInput
    {
        /// <summary>
        /// home_goods_id
        /// </summary>
        public int home_goods_id { get; set; }
        /// <summary>
        /// bannner状态
        /// </summary>
        public int status { get; set; }
    }


    public class BatchAddHomeGoodsInput
    {
        /// <summary>
        /// 商品编号
        /// </summary>
        [DataType(DataType.MultilineText)]
        public string goods_ids { get; set; }
    }

    #endregion

    #region 优惠券
    public class GetCouponsOutput
    {
        /// <summary>
        /// 优惠券编号
        /// </summary>
        public int coupon_id { get; set; }
        /// <summary>
        /// 名称
        /// </summary>
        public string coupon_name { get; set; }
        /// <summary>
        /// 类型
        /// </summary>
        public int coupon_type { get; set; }
        /// <summary>
        /// 排序
        /// </summary>
        public int sort { get; set; }
        /// <summary>
        /// 总额
        /// </summary>
        public int total_quantity { get; set; }
        /// <summary>
        /// 剩余金额
        /// </summary>
        public int remain_quantity { get; set; }
        /// <summary>
        /// 金额
        /// </summary>
        public decimal amount { get; set; }
        /// <summary>
        /// 价值
        /// </summary>
        public decimal value { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        public byte status { get; set; }
        /// <summary>
        /// 开始时间
        /// </summary>
        public System.DateTime start_date { get; set; }
        /// <summary>
        /// 结束时间
        /// </summary>
        public System.DateTime end_date { get; set; }
        /// <summary>
        /// 添加时间
        /// </summary>
        public System.DateTime add_time { get; set; }

    }

    public class UpdateCouponStatusInput
    {
        /// <summary>
        /// id
        /// </summary>
        public int coupon_id { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        public int status { get; set; }
    }

    public class GetCouponOutput
    {
        internal List<int> _goods_ids;

        /// <summary>
        /// 优惠券编号
        /// </summary>
        [DisplayName("优惠券编号")]
        public int coupon_id { get; set; }
        /// <summary>
        /// 名称
        /// </summary>
        [DisplayName("优惠券名称")]
        [Required(ErrorMessage = "名称不能为空！")]
        public string coupon_name { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        [DisplayName("优惠券描述")]
        public string description { get; set; }
        /// <summary>
        /// 适用用户 0-不限制 1-普通券 2-会员券
        /// </summary>
        [DisplayName("类型")]
        [Required(ErrorMessage = "类型不能为空！")]
        public int coupon_type { get; set; }
        /// <summary>
        /// 排序
        /// </summary>
        [DisplayName("排序")]
        [Required(ErrorMessage = "排序不能为空！")]
        public int sort { get; set; }
        /// <summary>
        /// 发行数量
        /// </summary>
        [DisplayName("发行数量")]
        [Required(ErrorMessage = "发行数量不能为空！")]
        public int? total_quantity { get; set; }
        /// <summary>
        /// 剩余数量
        /// </summary>
        [DisplayName("剩余数量")]
        [Required(ErrorMessage = "剩余数量不能为空！")]
        public int remain_quantity { get; set; }
        /// <summary>
        /// 是否全部
        /// </summary>
        [DisplayName("是否全部")]
        public bool is_all { get; set; }
        /// <summary>
        /// 限制使用额度
        /// </summary>
        [DisplayName("限制使用额度")]
        [Required(ErrorMessage = "限制使用额度不能为空！")]
        public decimal? amount { get; set; }
        /// <summary>
        /// 优惠券面值
        /// </summary>
        [DisplayName("优惠券面值")]
        [Required(ErrorMessage = "优惠券面值不能为空！")]
        public decimal? value { get; set; }
        /// <summary>
        /// 开始时间
        /// </summary>
        [DisplayName("开始时间")]
        [Required(ErrorMessage = "开始时间不能为空！")]
        public System.DateTime? start_date { get; set; }
        /// <summary>
        /// 结束时间
        /// </summary>
        [DisplayName("结束时间")]
        [Required(ErrorMessage = "结束时间不能为空！")]
        public System.DateTime? end_date { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        [DisplayName("状态")]
        [Required(ErrorMessage = "状态不能为空！")]
        public byte status { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        [DisplayName("优惠券说明")]
        public string remark { get; set; }

        /// <summary>
        /// 添加时间
        /// </summary>
        [DisplayName("添加时间")]
        public System.DateTime add_time { get; set; }

        /// <summary>
        /// 商品编号
        /// </summary>
        [DataType(DataType.MultilineText)]
        public string goods_ids { get; set; }

    }

    public class BatchAddCouponInput
    {
        /// <summary>
        /// 名称
        /// </summary>
        [DisplayName("优惠券名称")]
        [Required(ErrorMessage = "名称不能为空！")]
        public string coupon_name { get; set; }
        /// <summary>
        /// 优惠券描述
        /// </summary>
        [DisplayName("优惠券描述")]
        public string description { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        [DisplayName("优惠券说明")]
        public string remark { get; set; }
        /// <summary>
        /// 优惠券面值
        /// </summary>
        public List<CouponValue> coupon_values { get; set; }
        /// <summary>
        /// 开始时间
        /// </summary>
        [DisplayName("开始时间")]
        [Required(ErrorMessage = "开始时间不能为空！")]
        public System.DateTime? start_date { get; set; }
        /// <summary>
        /// 结束时间
        /// </summary>
        [DisplayName("结束时间")]
        [Required(ErrorMessage = "结束时间不能为空！")]
        public System.DateTime? end_date { get; set; }

        /// <summary>
        /// 适用用户 0-不限制 1-普通券 2-会员券
        /// </summary>
        [DisplayName("类型")]
        [Required(ErrorMessage = "类型不能为空！")]
        public int coupon_type { get; set; }

        /// <summary>
        /// 商品编号
        /// </summary>
        [DataType(DataType.MultilineText)]
        public string goods_ids { get; set; }

    }

    public class CouponValue
    {
        /// <summary>
        /// 优惠券面值
        /// </summary>
        [DisplayName("优惠券面值")]
        [Required(ErrorMessage = "优惠券面值不能为空！")]
        public decimal? value { get; set; }
        /// <summary>
        /// 发行数量
        /// </summary>
        [DisplayName("发行数量")]
        [Required(ErrorMessage = "发行数量不能为空！")]
        public int? total_quantity { get; set; }
        /// <summary>
        /// 限制使用额度
        /// </summary>
        [DisplayName("限制使用额度")]
        [Required(ErrorMessage = "限制使用额度不能为空！")]
        public decimal? amount { get; set; }
    }

    #endregion

    #region 补贴卡
    public class GetSubsidiesOutput
    {
        /// <summary>
        /// 补贴ID
        /// </summary>
        public int subsidy_id { get; set; }
        /// <summary>
        /// 补贴名称
        /// </summary>
        public string subsidy_name { get; set; }
        /// <summary>
        /// 补贴金额
        /// </summary>
        public decimal amount { get; set; }
        /// <summary>
        /// 剩余金额
        /// </summary>
        public Nullable<decimal> remain { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        public byte status { get; set; }
        /// <summary>
        /// 开始时间
        /// </summary>
        public System.DateTime start_time { get; set; }
        /// <summary>
        /// 结束时间
        /// </summary>
        public System.DateTime end_time { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        public string remark { get; set; }
        /// <summary>
        /// 添加时间
        /// </summary>
        public System.DateTime add_time { get; set; }
    }

    public class UpdateSubsidyStatusInput
    {
        /// <summary>
        /// id
        /// </summary>
        public int subsidy_id { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        public int status { get; set; }
    }

    public class GetSubsidyOutput
    {
        internal List<int> _goods_ids { get; set; }
        /// <summary>
        /// 补贴ID
        /// </summary>
        [DisplayName("补贴编号")]
        public int subsidy_id { get; set; }
        /// <summary>
        /// 补贴名称
        /// </summary>
        [DisplayName("补贴名称")]
        [Required(ErrorMessage = "补贴名称不能为空！")]
        public string subsidy_name { get; set; }
        /// <summary>
        /// 补贴金额
        /// </summary>
        [DisplayName("补贴金额")]
        [Required(ErrorMessage = "补贴金额不能为空！")]
        public decimal? amount { get; set; }
        /// <summary>
        /// 剩余金额
        /// </summary>
        [DisplayName("剩余金额")]
        public Nullable<decimal> remain { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        [DisplayName("补贴状态")]
        public byte status { get; set; }
        /// <summary>
        /// 开始时间
        /// </summary>
        [DisplayName("开始时间")]
        [Required(ErrorMessage = "开始时间不能为空！")]
        public System.DateTime? start_time { get; set; }
        /// <summary>
        /// 结束时间
        /// </summary>
        [DisplayName("结束时间")]
        [Required(ErrorMessage = "结束时间不能为空！")]
        public System.DateTime? end_time { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        [DisplayName("补贴说明")]
        public string remark { get; set; }

        [DataType(DataType.MultilineText)]
        [Required(ErrorMessage = "商品不能为空！")]
        public string goods_ids { get; set; }
        /// <summary>
        /// 补贴规则
        /// </summary>
        public List<GetSubsidyItemOutput> subsidy_items { get; set; }
    }

    public class GetSubsidyItemOutput
    {
        [DisplayName("编号")]
        public int id { get; set; }
        [DisplayName("补贴编号")]
        [Required(ErrorMessage = "补贴编号不能为空！")]
        public int subsidy_id { get; set; }
        [DisplayName("标题")]
        [Required(ErrorMessage = "标题不能为空！")]
        public string name { get; set; }
        [DisplayName("比例")]
        [Required(ErrorMessage = "比例不能为空！")]
        public decimal rate { get; set; }
        [DisplayName("总周期")]
        [Required(ErrorMessage = "总周期不能为空！")]
        public int total_cycle { get; set; }
        [DisplayName("备注")]
        public string remark { get; set; }
        public System.DateTime add_time { get; set; }
    }

    /// <summary>
    /// 补贴卡
    /// </summary>
    public class AddSubsidyInput
    {
        internal List<int> _goods_ids;

        /// <summary>
        /// 补贴名称
        /// </summary>
        [DisplayName("补贴名称")]
        [Required(ErrorMessage = "补贴名称不能为空！")]
        public string subsidy_name { get; set; }
        /// <summary>
        /// 补贴说明
        /// </summary>
        [DisplayName("补贴说明")]
        public string remark { get; set; }

        /// <summary>
        /// 补贴金额
        /// </summary>
        [DisplayName("补贴金额")]
        [Required(ErrorMessage = "补贴金额不能为空！")]
        public decimal? amount { get; set; }

        /// <summary>
        /// 开始时间
        /// </summary>
        [DisplayName("开始时间")]
        [Required(ErrorMessage = "开始时间不能为空！")]
        public System.DateTime? start_time { get; set; }
        /// <summary>
        /// 结束时间
        /// </summary>
        [DisplayName("结束时间")]
        [Required(ErrorMessage = "结束时间不能为空！")]
        public System.DateTime? end_time { get; set; }


        [DataType(DataType.MultilineText)]
        [Required(ErrorMessage = "商品不能为空！")]
        public string goods_ids { get; set; }
        /// <summary>
        /// 补贴规则
        /// </summary>
        public List<SubsidyItemInput> subsidy_items { get; set; }
        public int subsidy_id { get; internal set; }
    }

    public class SubsidyItemInput
    {
        public int id { get; internal set; }
        [DisplayName("补贴比例")]
        [Required(ErrorMessage = "补贴比例不能为空！")]
        public decimal rate { get; set; }
        [DisplayName("补贴期数")]
        [Required(ErrorMessage = "补贴期数不能为空！")]
        public int total_cycle { get; set; }
        [DisplayName("发行张数")]
        [Required(ErrorMessage = "发行张数不能为空！")]
        public int? quantity { get; set; }

    }
    #endregion

}
